net/ipv6: Fix CALIPSO causing GPF with datagram support
authorRichard Haines <richard_c_haines@btinternet.com>
Mon, 5 Jun 2017 15:44:40 +0000 (16:44 +0100)
committerRaspbian kernel package updater <root@raspbian.org>
Sun, 23 Jul 2017 02:54:16 +0000 (02:54 +0000)
commit0f1e9a9cb9f3791e10ff4f5961729e73c1063c30
tree6513d5a5f8a06606411f9330c414c589e70a67ee
parent784b221e53a4b13a9fbf9b4e777dd7ccb256464b
net/ipv6: Fix CALIPSO causing GPF with datagram support

[ Upstream commit e3ebdb20fddacded2740a333ff66781e0d28b05c ]

When using CALIPSO with IPPROTO_UDP it is possible to trigger a GPF as the
IP header may have moved.

Also update the payload length after adding the CALIPSO option.

Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv6/calipso.c